package com.caseProcess.service.impl;

import com.caseProcess.entity.Department;
import com.caseProcess.entity.Role;
import com.caseProcess.entity.User;
import com.caseProcess.mapper.UserDao;
import com.caseProcess.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UserServiceImpl implements UserService {

   @Resource
    private UserDao userDao;

    @Override
    public List<User> getUser(String roleId) {
        return userDao.getUser(roleId);
    }

    @Override
    public int batchInsert(List<User> list) {
        return userDao.batchInsert(list);
    }

    @Override
    public User getUserpwd(String policeId) {
        return userDao.getUserpwd(policeId);
    }

    @Override
    public User getUserandPwd(String policeId, String pwd) {
        return userDao.getUserandPwd(policeId,pwd);
    }

    @Override
    public int updatePwd(User user) {
        return userDao.updatePwd(user);
    }

    @Override
    public int upLocking(int lookCount,String policeId) {
        return userDao.upLocking(lookCount,policeId);
    }

    @Override
    public int insert(User user) {
        return userDao.insert(user);
    }

    @Override
    public int delete(String policeId) {
        return userDao.delete(policeId);
    }


    @Override
    public int update(User user) {
        return userDao.update(user);
    }

    @Override
    public List<User> select() {
        return userDao.select();
    }

    @Override
    public List<User> selectAllBy(User user) {
        return userDao.selectAllBy(user);
    }

    @Override
    public User isExist(String policeId) {
        return userDao.isExist(policeId);
    }
//
//    @Override
//    public int delete(String policeNumber) {
//        return userDao.delete(policeNumber);
//    }
//
//    @Override
//    public int updateByA(String fullName, String sex, String roleId, String mobile, String departmentId, String policeNumber) {
//        return userDao.updateByA(fullName,sex,roleId,mobile,departmentId,policeNumber);
//    }
//
//    @Override
//    public int updatePwd(String pwd, String policeNumber) {
//        return userDao.updatePwd(pwd,policeNumber);
//    }
//
//
//    @Override
//    public List<User> selectByDepartment(String departmentId) {
//        return userDao.selectByDepartment(departmentId);
//    }
//
//    @Override
//    public List<User> selectByRole(String roleId) {
//        return userDao.selectByRole(roleId);
//    }
//
//    @Override
//    public User login(String policeNumber) {
//        return userDao.login(policeNumber);
//    }


}
